package org.fenixsoft.jvm.chapter8.my;

import java.util.Random;

public class MethodHandleTest2 {

    public static void main(String[] args) {
        Object obj = new Random(10).nextBoolean() ? new ClassA() : System.out;

    }

    static class ClassA {
        public void println(String s) {
            System.out.println(s);
        }
    }

}
